package com.star.security.user;

import com.star.security.exception.UsernameNotFoundException;
import org.bouncycastle.util.Integers;

/**
 * 用户信息接口
 *
 * @author yangzj
 */
public interface UserDetailsService {

	/**
	 * 获取通过用户名
	 *
	 * @param username 用户名
	 * @param details  type
	 * @return {@link UserDetails}
	 * @throws UsernameNotFoundException 找不到用户名异常
	 */
	UserDetails getByUsername(String username, Object details) throws UsernameNotFoundException;

	/**
	 * 获取通过打开ID
	 * 获取通过微信小程序的openId
	 *
	 * @param openId  openId
	 * @param unionId unionId
	 * @param details type
	 * @return {@link UserDetails}
	 * @throws UsernameNotFoundException 用户名找不到异常
	 */
	UserDetails getByOpenId(String openId, String unionId, Object details) throws UsernameNotFoundException;

}
